<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>个人中心</h1>
<?php

$name = $_FILES['file']['name'];
$arr = explode('.',$oldname);
move_uploaded_file($_FILES['file']['tmp_name'],'img/'.$name);
$img_url = 'img/'.$name;
?>
头像:
<img src="<?php echo $img_url; ?>" >
<br />
<a href="upload.php">更改头像</a>
</body>
</html>